package com.bridgeintelligent.tag.webserver.schedule.service.mapper;

import com.bridgeintelligent.tag.webserver.schedule.api.entity.TaskLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * @description
 * @author: grp 2021-01-13 10:32
 **/
@Mapper
public interface TaskLogMapper {

    void insert(String id, String type, Date date);

    @Select("select id,type,create_time from ( select id,type,create_time from tag_task_log  where type = " +
            "#{jobType} order by create_time desc )  where rownum <=3")
    List<TaskLog> top3(String jobType);
}
